var $j = jQuery.noConflict();
                        	$j(document).ready(function($)
                        	    
                            {                      
                        		$j("a.colorbox").colorbox({width:"80%", height:"90%", iframe:true, overlayClose:false, opacity:0.5, transition:"fade", speed:150});
                        	
                            	// Bindings
                            	$j(document).bind("cbox_open", function(){
                                    $j("body").css({"overflow":"hidden"});
                                    $j("html").css({"overflow":"hidden"});
                                    $j("#qmEditor").css({"display":"none"});
                                });  
                                
                            	$j(document).bind("cbox_closed", function(){      
                                    $j("body").css({"overflow":"auto"});
                                    $j("html").css({"overflow":"auto"});
                                    $j("#qmEditor").css({"display":"block"});
                                    // Remove manager lock by going to home page
                                    $j.ajax({ type: "GET", url: "http://www.videosgag.es/manager/index.php?a=2" });
                                });                  
                                                            						                            
                                // Hide QM+ if cookie found
                                if (getCookie("hideQM") == 1)
                                {
                                    $j("#qmEditor").css({"display":"none"});
                                    $j("#qmEditorClosed").css({"display":"block"});    
                                }
                                
                                // Hide QM+
                                $j(".qmClose").click(function () {
                                    $j("#qmEditor").hide("normal");
                                    $j("#qmEditorClosed").show("normal");
                                    document.cookie = "hideQM=1; path=/;";
                                });
                                
                                // Show QM+
                                $j("#qmEditorClosed").click(function () {
                                    {
                                        $j("#qmEditorClosed").hide("normal");
                                        $j("#qmEditor").show("normal");
                                        document.cookie = "hideQM=0; path=/;";
                                    }
                                });
    
                            });
                            
                            function getCookie(cookieName)
                            {
                                var results = document.cookie.match ( "(^|;) ?" + cookieName + "=([^;]*)(;|$)" );
        
                                if (results) return (unescape(results[2]));
                                else return null;
                            }// JavaScript Document